home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / batch / isel12f.zip / ISEL.TXT < prev   
Text File  |  1992-11-24  |  4KB  |  124 lines

  1. I had a bunch of little utilities on my network to test for various
  2. conditions. I combined most of them into one program and thought
  3. that other people may find it useful. There is nothing exotic in
  4. ISEL, it just does a few things I needed, and it is also quite
  5. small in size. ISEL is freeware, I hope you find it useful. If you
  6. have any comments I can be reached at 70740,3614 on CIS.
  7.  
  8. This utility is intended be run during login or menu scripts.
  9. Output can be redirected to NULL so the user does not have to be
  10. bothered with its various messages. It is a totally passive
  11. utility, that is, it's intent is not to DO anything based on a
  12. condition, but to warn of a condition so that menu or login scripts
  13. can be tailored to handle the specific event.
  14.  
  15. How to use ISEL.COM
  16. ISEL is command line driven, arguments are placed after the
  17. separator '/'. Arguments, for obvious reasons, cannot be combined.
  18. All arguments but the first will be ignored if more than one is
  19. specified.
  20.  
  21. Test for Graphics Adapter...
  22. Syntax  ISEL/A
  23.  
  24. will set Errorlevel to   If you have
  25.           0              MDA
  26.           1              CGA
  27.           2              EGA
  28.           3              MCGA
  29.           4              VGA
  30.  
  31.  
  32. Test for day of week...
  33. Syntax Isel/<day>
  34.  
  35. The <day> parameter goes from 0 to 7, 0 being Sunday. So, if you
  36. wanted to start a program every Friday you would put
  37. ISEL/D6 
  38. If errorlevel 1 call runit
  39. in your LOGIN script or AUTOEXEC.BAT
  40.  
  41. Test for Expanded memory...
  42. Syntax ISEL/e585
  43.  
  44. Some applications give an annoying error message if it finds expanded
  45. memory, but there isn't enough for the application to use it. 
  46. For instance, if you start WordPerfect with the /R switch and there
  47. is not enough expanded memory it beeps at the user and displays
  48. an error message. With this option you can detect how much expanded memory
  49. is actually available and then run the application based on the result.
  50.  
  51. This is a section of my WordPerfect batch file...
  52.  
  53. @echo off
  54. y:\public\util\isel/e585 >NUL
  55. if errorlevel 1 goto noems
  56. echo EMS detected...loading WP overlays...
  57. CALL wp /nt=1 /r /u=abc /pf=c:\ /ps=n:\wp\macro /d-c:\ /w=*,* %wpuser% %wpstart%
  58. goto exit
  59. :noems
  60. CALL wp /nt=1 /pf=c:\ /u=abc /ps=n:\wp\macro /d-c:\  %wpuser% %wpstart%
  61. :exit
  62.  
  63.  
  64. Test for the existence of a subdirectory...
  65. Syntax    ISEL /I<subdirectory>
  66.  
  67. This will raise ERRORLEVEL 1 if the directory exists. I use it in
  68. my SABER menu script like this...
  69.      EXEC z:\public\util\isel /In:\org >NUL
  70.      EXEC if NOT errorlevel  1 goto runit
  71.      EXEC md n:\org
  72.      EXEC ncopy z:\apps\org\cnfgbin n:\org\cnfg.bin
  73.      EXEC :runit
  74. This creates the configuration files for the application if the
  75. N:\ORG subdirectory does not exist.
  76.  
  77.  
  78.  
  79. Test for low volume space...
  80. Syntax ISEL/Kxyyy,zzz
  81.  
  82. x= the drive letter, no colon.
  83. yyy= is the level of space, expressed in Kilobytes that will raise
  84.     errorlevel 1.
  85. zzz= is the level of space, expressed in Kilobytes that will raise
  86.     errorlevel 2. This parameter may be omitted. 
  87. You can use this for installation routines or in Login scripts to
  88. warn of a low disk space condition. I use it in my SABER.USR file
  89. like this,
  90.  y:\public\util\isel/kn500 >NUL
  91.  if ERRORLEVEL 1 call lowspace.bat
  92. If the users space on their N: drive falls below 500K a warning
  93. message appears telling  them that they should either clean up
  94. their drive space or contact me to have more space allocated.
  95.  
  96. Test for Processor Type...
  97. Syntax ISEL/P
  98. will set Errorlevel to   If you have
  99.          1         8086/8088
  100.          2         80286
  101.              3           80386
  102.          4           80486 and up
  103.  
  104. Test if Windows is running...
  105. Syntax  ISEL/W
  106.  
  107. Errorlevel will be raised to 1 if Windows is running.
  108. I don't use this, but I thought some people might find it useful. 
  109. Thanks to Brett Warthen for the code used in this test!
  110.  
  111. Test for DOS version...
  112. Syntax    ISEL/V3.30 
  113. will set Errorlevel to 1 if the users PC is running a lower version than DOS
  114. 3.30.
  115.  
  116. Test for Group Memebership...
  117. Syntax    ISEL/Gappusers
  118. will set Errorlevel to 1 if the user is not a member of group 'appusers.'
  119.  
  120.  
  121. Test for IPX/IPXODI presence...
  122. Syntax ISEL/X
  123. will set Errorlevel to 1 if IPX is loaded, 2 if ODI drivers are running.
  124.